package top.go2do.auth.exception;

/**
 * @author xingyuji
 * @date 2025/3/18 06:40
 * @description
 */
public enum AuthErrorCode {
    APP_NAME_EXIST(1411, "app.name_exist"),
    APP_ID_NOT_EXIST(1412, "app.app_id_not_exist"),
    USER_PASSWORD_ERROR(1413, "user.password_error"),
    USERNAME_NOT_EXIST(1414, "user.username_not_exist"),
    USER_LOCKED(1415, "user.locked"),
    USER_LOG_OFF(1416, "user.log_off"),
    USER_LOGIN_NEED_CAPTCHA(1417, "user.login_need_captcha"),
    USER_LOGIN_NO_CAPTCHA(1418, "user.login_no_captcha"),
    USER_LOGIN_CAPTCHA_ERROR(1419, "user.login_captcha_error"),
    USER_LOGIN_CAPTCHA_EXPIRED(1420, "user.login_captcha_expired"),
    PERM_NAME_EXIST(1421, "perm.name_exist"),
    PERM_CODE_EXIST(1422, "perm.code_exist"),
    PERM_ID_NOT_EXIST(1423, "perm.id_not_exist"),
    ROLE_NAME_EXIST(1424, "role.name_exist"),
    ROLE_CODE_EXIST(1425, "role.code_exist"),
    ROLE_ID_NOT_EXIST(1426, "role.id_not_exist"),
    USER_NAME_EXIST(1427, "user.username_exist"),
    USER_EMAIL_EXIST(1428, "user.email_exist"),
    USER_PHONE_EXIST(1429, "user.phone_exist"),
    USER_ID_NOT_EXIST(1430, "user.id_not_exist"),
    ;

    private final int code;
    private final String msgKey;

    AuthErrorCode(int code, String msgKey) {
        this.code = code;
        this.msgKey = msgKey;
    }

    public int getCode() {
        return code;
    }

    public String getMsgKey() {
        return msgKey;
    }
}
